package com.wanxi.demo;

public class EatableDemo {
    public static void main(String[] args) {
        userEatable(new Eatable() {
            @Override
            public void eat() {
                System.out.println("aaa");
            }
        });
        userEatable(()-> System.out.println("bb"));
    }

    static void userEatable(Eatable e) {
        e.eat();
    }
}
